import {createElement} from "./createEl.js";
import {changeCurrent} from "./changeCurrent.js";
import {addAlbum} from "./addAlbum.js";
import {addPicture} from "./addPicture.js";
import "./style.css";
export var albumMap={
    "default":[]
  };
export var currentAlbum="default";





  document.body.appendChild(createElement(`
    <div class="album">
    <nav class="tools">
    <a  href="#" class="add">新建相册</a>
    <input type="file">
    <a href="#" class="up">上传图片</a>
    </nav>
    <nav class="albumName">
    <a  href="#" data-type="default">default</a>
    </nav>
  <div class="picture"></div>
  <div>`));
  //获取Dom对象
  var albumDom=document.body.querySelector(".albumName");
  var pictureDom=document.body.querySelector(".picture");
  var addDom=document.body.querySelector(".tools>.add");
  var upDom=document.body.querySelector(".tools>.up");
  var inputDom=document.body.querySelector("input[type='file']");
  var defaultDom=albumDom.firstElementChild;
  defaultDom.addEventListener("click",changeCurrent);
  addDom.addEventListener("click",addAlbum);
  upDom.addEventListener("click",function (event){inputDom.click()});
  inputDom.addEventListener("change",addPicture);
